home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2005 June (DVD) / DPPRO0605DVD.iso / Install / program files / Borland / BDS / 3.0 / Objrepos / DelphiDotNet / WinFormTemplate.pas < prev   
Encoding:
Pascal/Delphi Source File  |  2004-10-22  |  1.9 KB  |  82 lines

  1. unit [!UnitName];
  2.  
  3. interface
  4.  
  5. uses
  6.   System.Drawing, System.Collections, System.ComponentModel,
  7.   System.Windows.Forms, System.Data[!AdditonalUsesList];
  8.  
  9. type
  10. [!if=(AncestorName, "<NONE>")]
  11.   T[!ClassName] = class(System.Windows.Forms.Form)
  12. [!else]
  13.   T[!ClassName] = class([!AncestorName])
  14. [!endif]
  15.   {$REGION 'Designer Managed Code'}
  16.   strict private
  17.     /// <summary>
  18.     /// Required designer variable.
  19.     /// </summary>
  20.     Components: System.ComponentModel.Container;
  21.     /// <summary>
  22.     /// Required method for Designer support - do not modify
  23.     /// the contents of this method with the code editor.
  24.     /// </summary>
  25.     procedure InitializeComponent;
  26.   {$ENDREGION}
  27.   strict protected
  28.     /// <summary>
  29.     /// Clean up any resources being used.
  30.     /// </summary>
  31.     procedure Dispose(Disposing: Boolean); override;
  32.   private
  33.     { Private Declarations }
  34.   public
  35.     constructor Create;
  36.   end;
  37.  
  38.   [assembly: RuntimeRequiredAttribute(TypeOf(T[!ClassName]))]
  39.  
  40. implementation
  41.  
  42. {$AUTOBOX ON}
  43.  
  44. {$REGION 'Windows Form Designer generated code'}
  45. /// <summary>
  46. /// Required method for Designer support -- do not modify
  47. /// the contents of this method with the code editor.
  48. /// </summary>
  49. procedure T[!ClassName].InitializeComponent;
  50. begin
  51.   Self.Components := System.ComponentModel.Container.Create;
  52. [!if=(AncestorName, "<NONE>")]
  53.   Self.Size := System.Drawing.Size.Create(300, 300);
  54.   Self.Text := '[!ClassName]';
  55. [!endif]
  56. end;
  57. {$ENDREGION}
  58.  
  59. procedure T[!ClassName].Dispose(Disposing: Boolean);
  60. begin
  61.   if Disposing then
  62.   begin
  63.     if Components <> nil then
  64.       Components.Dispose();
  65.   end;
  66.   inherited Dispose(Disposing);
  67. end;
  68.  
  69. constructor T[!ClassName].Create;
  70. begin
  71.   inherited Create;
  72.   //
  73.   // Required for Windows Form Designer support
  74.   //
  75.   InitializeComponent;
  76.   //
  77.   // TODO: Add any constructor code after InitializeComponent call
  78.   //
  79. end;
  80.  
  81. end.
  82.